import http from "../utils/http";
import {Tree} from "../type.ts";

export default {
    queryList:function (groupId){
        return http.get<Tree[]>("/apple/tree/list", {params: {groupId}});
    },
    insert:function (data){
        return http.post("/apple/tree", {data});
    },
    queryById:function (id){
        return http.get<Tree[]>("/apple/tree", {params: {id}});
    },
    update:function (data){
        return http.put("/apple/tree", {data});
    },
    deleteById:function (id){
        return http.delete("/apple/tree?id=" + id, );
    },
    queryNotice:function (){
        return http.get("/apple/tree/notice");
    }
}